<?php
namespace BP\Sys;

use BP\En\EntitiesTree;

class FrmTrees extends EntitiesTree {
	public static function constructor__ () 
	{
		$me = new self();
		return $me;
	}
	public function getNewEntity () 
	{
		return FrmTree::constructor__();
	}
	public function RetrieveAll () 
	{
		$i = parent->RetrieveAll();
		if (($i == 0))
		{
			$fs = FrmTree::constructor__();
			$fs->setName("公文�?");
			$fs->setNo("01");
			$fs->Insert();
			$fs = FrmTree::constructor__();
			$fs->setName("办公�?");
			$fs->setNo("02");
			$fs->Insert();
			$i = parent->RetrieveAll();
		}
		return $i;
	}
	public function ToJavaList () 
	{
		return $this;
	}
	public function Tolist () 
	{
		$list = [];// 
		for ($i = 0; ($i < $this->size()); ++$i) 
		{
			$list->add($this->get($i));
		}
		return $list;
	}
}
?>
